package com.yc.oop1;

//电脑对象
public class Computer {
	//属性
	public double size;
	public String color;
	public double price;
	
	
	//方法   [权限] [修饰符] 返回类型 方法名([参数]){ 方法体 }
	public void study() {
		System.out.println("学习");
	}
	
	
	public Computer() {
		System.out.println("我是构造函数");
	}
	//利用构造函数,为对象的属性进行初始化赋值
	public Computer(double size, String color, double price) {
		//this指当前对象
		this.size = size;
		this.color = color;
		this.price = price;
	}
}
